#imports
import random

# appending to a file
f = open("file1.txt", "a")
randomQuotes = ["I need to find an easy job", "I wish I was in London", "Let's go party in Rio"]
randomNumber = random.randrange(0, len(randomQuotes))
randomQuote = randomQuotes[randomNumber]
f.write(randomQuote + "\n")
f.close()

# reading off a file
f = open("file1.txt", "r")

# do while
while True:
    line = f.readline()
    if line == "":
        break
    print line

f.close()


